Apple Silicon macOSでStable Diffusion web UIを動かす
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Installation-on-Apple-Silicon
#Stable_Diffusion_web_UI
CPUで動かすことになる
git clone
pyenvでPython 3.10.9
モデルは https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt を選択(よくわかっていない)
models/Stable-diffusion/v1-5-pruned-emaonly.ckpt に配置した
./webui.shだけ
venvが作られる(pyenvで指定したバージョンでpython3が動く)
立ち上がったが、呪文を入れて画像を生成しようとするとエラー
RuntimeError: "upsample_nearest2d_channels_last" not implemented for 'Half'
Workaround
--no-hald-vaeに--no-halfも足した
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/5ab7f213bec2f816f9c5644becb32eb72c8ffb89/webui-macos-env.sh#L13
code:webui-macos-env.sh.diff
-export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"
+export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --no-half --use-cpu interrogate"
ref: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/8555#issuecomment-1537272479
これでエラーは再現せずに動いている(猫の絵を作るなどした)
【雑記】じぶん Release Notes : 期末だったりプロンプトエンジニアリングやってみたりのプロンプトで何ができるか見てみる
a girl with black hair and ribbon. wearing kimono. with smile shyly. upper body. without hands. at spring morning. with cherry blossom. in anime style.
seedは-1
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 1197544326, Size: 512x512, Model hash: cc6cb27103, Model: v1-5-pruned-emaonly
https://gyazo.com/faeb1e2782f8e5303ab25bddb99806af
safetensorでも動かす
https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.safetensors
seedとpromptの指定で再現した!